﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LibRadiant.Main;
using System.Windows.Forms;

namespace LibRadiant.IO
{
    public class AdvIOManager : IOManager
    {
        AdvIOManager(D3D9Core inContext) : base(inContext)
        {

        }

        //設計目標 : 1. buffered input, 2. 設定數個快速對應鍵
        //目前先只做Keyboard部分
        #region delegate
        public delegate void KeydownEvent(object sender);
        #endregion

        #region Key events
        public event KeydownEvent OnUpPressed;
        public event KeydownEvent OnDownPressed;
        public event KeydownEvent OnLeftPressed;
        public event KeydownEvent OnRightPressed;

        public void FireUpPressedEvent(object sender)
        {
            if (OnUpPressed != null)
                OnUpPressed(sender);
        }

        public void FireDownPressedEvent(object sender)
        {
            if (OnDownPressed != null)
                OnDownPressed(sender);
        }

        public void FireLeftPressedEvent(object sender)
        {
            if (OnLeftPressed != null)
                OnLeftPressed(sender);
        }

        public void FireRightPressedEvent(object sender)
        {
            if (OnRightPressed != null)
                OnRightPressed(sender);
        }
        #endregion

        

    }
}
